#  Dir Hacks:
#  1. Dir.folders(folder_name).
#  Returns an array of the subfolders in *folder_name*
#
#  _example_
#  Dir.folders("/Users/jakevarghese/docs/")
#  #=>  ["29Nov07", "30Apr08", "31Mar08", "5Nov07", "6Aug07", "7Feb08", "Omnitec"] 
#
#
#  2. Dir.files(folder_name).
#  Returns an array of the files in *folder_name*
#
#  _example_
#  Dir.files("/Users/jakevarghese/docs/")
#  #=>  [".coolguy.txt", ".htaccess", "404.html", "422.html", "500.html", "dispatch.cgi", "dispatch.fcgi", "dispatch.rb", "favicon.ico", "index.html", "robots.txt"]

class Dir
	class << self
		def folders(folder_name)
			Dir.entries(folder_name).select { |file| File.directory?(File.join(folder_name, file)) && file !~ /^\.*$/ }
		end
		def files(folder_name)
			Dir.entries(folder_name).select { |file| File.file?(File.join(folder_name, file)) }
		end
	end
end